package com.flower.gateway;

import lombok.Data;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

import java.util.Objects;

/**
 * @ClassName CloudSecurityProperties
 * @Description TODO
 * @Author 吃麻椒的花酱
 * @Date 2022/4/4 0:01
 * @Version 1.0
 */

@ConfigurationProperties(prefix = "gateway.cloud")
@Component
public class CloudSecurityProperties  {
    /**
     * 是否只能通过网关获取资源
     * 默认为True
     */
    private Boolean onlyFetchByGateway;

    public CloudSecurityProperties() {

    }

    public CloudSecurityProperties setOnlyFetchByGateway(Boolean onlyFetchByGateway) {
        this.onlyFetchByGateway = onlyFetchByGateway;
        return this;
    }

    public Boolean getOnlyFetchByGateway() {
        return onlyFetchByGateway;
    }
}
